var Zip = Zip || (function () {
    var pack = function (from, into) {
        var files = from.files().map(Files.path());
        from = from.dir().path();
        into = into.path();
        console.log("zipping", files.length, "file(s) from", from, "into", into);
        return Zip_pack(from, into, files);
    };

    var unpack = function (from, into) {
        from = from.path();
        into = into.path();
        console.log("unzipping", from, "into", into);
        return Zip_unpack(from, into);
    };

    return {
        pack: pack,
        unpack: unpack
    };
})();

FileSet.prototype.zip = FileSet.prototype.zip || function (into) {
    Zip.pack(this, into);
};

File.prototype.unzip = File.prototype.zip || function (into) {
    Zip.unpack(this, into);
};
